package google.android.ageofempires;

import android.content.Context;

/**
 * 
 * @author CaoMinhTri
 *
 */

public class Cell {
	
	/* private variable */
	private int 	mWidth, mHeight;
	private int 	mX, mY;
		
//	public Cell(Context context) {
//		
//	}
	
	/**
	 * ...method get X-coordinate left-top
	 */
	public int getX() {
		return mX;
	}
	
	/**
	 * ...method set X-coordinate left-top
	 * @param x
	 */
	public void setX(int x) {
		mX = x;
	}
	
	/**
	 * Lay toa do Y goc tren ben trai
	 */
	public int getY() {
		return mY;
	}
	
	/**
	 * Gan toa do Y goc tren ben trai
	 */
	public void setY(int y) {
		mY = y;
	}
	
	/**
	 * Lay chieu rong cua Cell
	 */
	public int getWidth() {
		return mWidth;
	}
	
	/**
	 * Gan chieu rong cho Cell
	 */
	public void setWidth(int width) {
		mWidth = width;
	}
	
	/**
	 * Lay chieu cao cua Cell
	 */
	public int getHeight() {
		return mHeight;
	}
	
	/**
	 * Gan chieu cao cho Cell
	 */
	public void setHeight(int height) {
		mHeight = height;
	}
	
	/**
	 * Kiem tra (x,y) nam trong Cell
	 */
	public boolean isInCell(int x, int y) {
		boolean flag = false;
		
		if ((x >= mX && x < mX + mWidth) && (y >= mY && y <= mY + mHeight)) {
			flag = true;
		}		
		return flag;
	}
	
//	/**
//	 * Lay index cua cell
//	 */
//	public int getIndexCell(int x, int y) {
//		
//		return 0;
//	}
}
